<!--datatables tools-->
<div class="row-fluid">
    <div class="span12">
        <div class="box corner-all">
            <div class="box-header grd-white corner-top">
                <div class="header-control">
                    <a data-box="collapse"><i class="icofont-caret-up"></i></a>
                </div>
                <span><?= lang('label_menu_link_advertise') ?></span>
            </div>
            <div class="box-body">
                <form action="<?= base_url() ?><?= get_segment(1) ?>/<?= get_segment(2) ?>/all" method="post" style="margin-bottom: 5px;" >
                    <table id="datatablestools" class="table table-hover responsive">
                        <div class="row-fluid">
                            <div class="span6">
                                <div class="DTTT btn-group">
                                    <select class="droop_tool_box" name='doaction'>
                                        <option value=""><?= lang('label_choose_fromlist') ?></option>
                                        <option value="delete"><?= lang('label_delete') ?></option>
                                    </select>
                                    <button class="btn DTTT_button_collection" ><span><?= lang('label_save') ?></span></button>
                                    <button class="btn btn-primary" type="button" onclick="location.href = '<?= base_url(ADMIN_FOLDER . '/' . get_segment(2) . '/add') ?>'" ><i class="icon-plus" style="margin-left: 5px"></i><span><?= lang('label_add') ?></span></button></div>
                            </div>
                            <div class="span6"></div>
                        </div>
                        <thead>
                            <tr>
                                <th><input type="checkbox" id="checkall" name="all"></th>
                                <th><?= lang('label_adv') ?></th>
                                <th><?= lang('label_select_language') ?></th>
                                <th><?= lang('label_created_date') ?></th>
                                <th><?= lang('label_last_update') ?></th>
                                <th><?= lang('label_tool') ?></th>
                            </tr>
                        </thead>
                        <tbody>
                            <? foreach ($result as $value) { ?>
                                <tr class="gradeA">
                                    <td><input type="checkbox" class="checkall" value="<?= $value->id ?>" name="id[]"></td>
                                    <td class="w300"><a href="<?= base_url() . ADMIN_FOLDER ?>/<?= get_segment(2) ?>/view/<?= $value->id ?>"><img style="width: 100px;height: 100px" src="<?= base_url(ADS_PATH.$value->image) ?>"></a></td>
                                    <td><?= $value->lang ?></td>
                                    <td><?= timespan($value->create_date, time()) ?></td>
                                    <td><?= timespan($value->modify_date, time()) ?></td>
                                    <td class="center">
                                        <div class="btn-group">
                                            <button class="btn  dropdown-toggle" data-toggle="dropdown"><i class="icon-cog"></i>  <?= lang('label_operation') ?> <span class="caret"></span></button>
                                            <ul class="dropdown-menu">
                                                <li><a class="delete_confirm" href="<?= base_url() . ADMIN_FOLDER ?>/<?= get_segment(2) ?>/delete/<?= $value->id ?>"><i  class="icon-trash"></i> <?= lang('label_delete') ?></a></li>
                                            </ul>
                                        </div>

                                    </td>
                                </tr>
<?php } ?>
                        </tbody>
                    </table>
                    <div class="row-fluid">
                        <div class="span6">
                            <div class="DTTT btn-group">
                                <select class="droop_tool_box" name='doaction'>
                                    <option value=""><?= lang('label_choose_fromlist') ?></option>
                                    <option value="delete"><?= lang('label_delete') ?></option>
                                </select>
                                <button class="btn DTTT_button_collection" ><span><?= lang('label_save') ?></span></button>
                                <button class="btn btn-primary" type="button" onclick="location.href = '<?= base_url(ADMIN_FOLDER . '/' . get_segment(2) . '/add') ?>'" ><i class="icon-plus" style="margin-left: 5px"></i><span><?= lang('label_add') ?></span></button></div>
                        </div>
                    </div>
            </div>
            </form>
        </div><!-- /box-body -->
    </div><!-- /box -->
</div><!-- /span -->
</div><!--/datatables tools-->

<div id="action_load_mudle">
    <!-- action contant  -->

</div>